package com.shixj.ef.core;

import com.shixj.ef.config.FetchConfig;
import com.shixj.ef.vo.FetchResult;
import org.apache.http.impl.client.CloseableHttpClient;

import java.util.List;

/**
 * Created by shixj on 2017/9/21.
 */
public interface HttpFetcher {
    /**
     * 设置爬虫参数
     * @param fetchConfig
     */
    void setFetchConfig(FetchConfig fetchConfig);



    /**
     * 开启爬虫
     * @param httpClient
     */
    void start(CloseableHttpClient httpClient);
    /**
     * 获取爬虫结果
     * @return
     */
    List<FetchResult> getFetchResults();

    /**
     * 阻塞队列获取
     * @return
     */
    FetchResult getFetchResult();
}
